package edu.sctu.zhuyingzhi.month201505.day20150524.IoTest;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Created by user13 on 2015/5/24.
 */
public class CopyFileTest {
    public void copyFile() throws IOException {
        FileInputStream fileIn = new FileInputStream("src\\main\\java\\edu\\sctu\\zhuyingzhi\\day20150525\\ioTest\\image.jpg");
        FileOutputStream fileOut = new FileOutputStream("src\\main\\java\\edu\\sctu\\zhuyingzhi\\day20150525\\ioTest\\image1.jpg");
//        FileOutputStream fileOut1 = new FileOutputStream("src\\main\\java\\edu\\sctu\\zhuyingzhi\\day20150525\\ioTest\\image1.bmp");

        byte[] buffer = new byte[132527];
        fileIn.read(buffer,0,132527);

        fileOut.write(buffer,0,132527);

        fileOut.flush();
        fileOut.close();
        fileIn.close();
//        fileOut1.write(buffer,0,200);

//        int end = buffer.length;
//
//
//        StringOne str = new StringOne(buffer,0,200,"gb2312");
//            System.out.println(str);


    }
}
